﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Net;
using System.IO;
using System.Xml;
using System.Text;
using System.Net.Sockets;

namespace Browser
{


    public partial class recupXMLUpload : System.Web.UI.Page
    {
        public void getBufferXML(string path)
        {
            Stream stream = Request.InputStream;
            int len = (int)stream.Length;
            UTF8Encoding utf8enc = new UTF8Encoding();
            byte[] tabByte = new byte[stream.Length];
            stream.Read(tabByte, 0, len);
            string XmlStr = utf8enc.GetString(tabByte, 0, tabByte.Length);
            XmlDocument xml = new XmlDocument();
            xml.LoadXml(XmlStr);
            xml.Save(path);
        }

        protected void  // ERROR: Handles clauses are not supported in C#
      Page_Load(object sender, System.EventArgs e)
        {
           // getBufferXML(path);
        }
    }
}

